package com.world.rickcloudendpoint.stream.filter;

import com.world.rickcloudendpoint.common.exception.FilterException;
import com.world.rickcloudendpoint.stream.message.Message;

import java.util.List;

/**
 * @description:
 * @author: jlsong
 * @date: 2022/03/11 21:07:52
 * @version: 1.0
 */
public class NoOpFilter implements Filter {
    @Override
    public FilteredMessages filter(List<Message> messages) throws FilterException {
        FilteredMessages filteredMessages = new FilteredMessages();
        messages.forEach(filteredMessages::addToValidMessages);
        return filteredMessages;
    }
}
